//个人中心页面
<template>
  <div class="user-center">
    <!-- 个人信息部分 -->
     <UserInfo @user-data-loaded="handleUserData" />
    <!-- 最近发表的文章 -->
     <UserActivities v-if="userData" :user-data="userData" />
  </div>
</template>

<script setup>
  import UserInfo from '@/components/accounts/personal/UserInfo.vue'
  import UserActivities from '@/components/accounts/personal/UserActivities.vue'
//创建响应式数据存储
const userData = ref(null);

// 事件处理函数
const handleUserData = (data) => {
  userData.value = data;
};
</script>

<style scoped>
/* 用户中心全局布局 */
.user-center {
  margin: 40px auto 0 auto;
  width: 80%;
  padding: 20px;
  font-family: Arial, sans-serif;
}



</style>
